<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
  <link rel="stylesheet" href="./css/teacher_index.css">
  <link rel="stylesheet" href="https://unpkg.com/element-ui/lib/theme-chalk/index.css">
</head>

<body>
  <div class="border container">

    <div id="app">
      <template>
        <el-tabs v-model="activeName" @tab-click="handleClick">
          <el-tab-pane label="已经布置的作业" name="first">
            <!-- <h3 v-for="(item,index) in title_data">{{item.title}} </h3> -->
            <h3 v-for="(item,index) in title_data" id="" @click="get_title">{{item.title}}</h3>
            <div id="iframeBox"><iframe src="./teacher_assigned_homework.html" frameborder="0" ref="fm"></iframe></div>
          </el-tab-pane>
          <el-tab-pane label="学生交作业情况" name="second">
            <div>
              <h3 v-for="(item,index) in title_data" id="" @click="get_student_homework">{{item.title}}</h3>
              <el-tag type="info" v-for="(item,index) in student_name" class="student_name" @click="get_student_answer"
                v-bind:id="item.uname">
                {{item.uname}}</el-tag>
              <div>
                <div class="job" v-for="(item,index) in data">
                  <span>{{index +1 + "."}}</span><span>{{item.title}}</span>
                  <div v-if="item.right==student_answer[index]">
                    正确答案是：{{item.right}}，学生答案是：{{student_answer[index]}}，答案正确
                  </div>
                  <div class="job_options">
                    <div v-if="item.A"><input type="checkbox" id="A" value="A">A: <p type="text"> {{ " " + item.A }}</p>
                    </div>
                    <div v-if="item.B"><input type="checkbox" id="B" value="B">B: <p type="text"> {{ " " + item.B }}</p>
                    </div>
                    <div v-if="item.C"><input type="checkbox" id="C" value="C">C: <p type="text"> {{ " " + item.C }}</p>
                    </div>
                    <div v-if="item.D"><input type="checkbox" id="C" value="D">D: <p type="text"> {{ " " + item.D }}</p>
                    </div>
                  </div>

                  <div v-if="!item.A&&item.right.length!==0"><span>请输入答案</span><textarea></textarea></div>
                  <div v-if="!item.A&&item.right.length==0" class="file"><input type="file" name="" id=""></div>
                </div>
              </div>
            </div>
          </el-tab-pane>
          <el-tab-pane label="布置作业" name="third">
            <div id="iframeBox">
              <iframe src="./teacher_set_homework.html" frameborder="0"></iframe>
            </div>
          </el-tab-pane>
        </el-tabs>
      </template>
    </div>
  </div>
</body>
<script src="../js/vue.js"></script>
<script src="../js/axios.js"></script>
<script src="https://unpkg.com/element-ui/lib/index.js"></script>
<script src="./js/teacher_index.js"></script>
<script src="../js/interceptor.js"></script>

</html>